﻿using ParboiledSharp.parboiled.dataobjects;

namespace ParboiledSharp.parboiled.rules
{
    class SequencePush : Sequence
    {
        public SequencePush(params object[] rules)
            : base(rules)
        {
        }

        public override void EndRule(bool result, Context context)
        {
            if (result)
            {
                context.GetStack().Push(context.GetMatch());
            }
        }
    }
}
